<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			.btn_su{font-size:20px ; line-height:36px}
			
			.top:link {
				color:#000000;text-decoration:none;
				}
			.top:visited {
				color:#000000;text-decoration:none;
				}
			
			body {
				font-family: 'Raleway', sans-serif;
			}
			nav a {
				position: relative;
				display: inline-block;
				margin: 15px 25px;
				outline: none;
				color: #fff;
				text-decoration: none;
				text-transform: uppercase;
				letter-spacing: 1px;
				font-weight: 400;
				text-shadow: 0 0 1px rgba(255,255,255,0.3);
				font-size: 1.35em;
			}
			nav a:hover,
			nav a:focus {
				outline: none;
			}
			.cl  {
				position: relative;
				margin-left: -50px;
				z-index: 1;
			}
			.cl a {
				overflow: hidden;
				margin: 0 30px;
			}
			.cl a span {
				display: block;
				padding: 10px 40px;
				background: #fffff;
				-webkit-transition: -webkit-transform 0.3s;
				-moz-transition: -moz-transform 0.3s;
				transition: transform 0.3s;
			}
			.cl a::before {
				position: absolute;
				top: 0;
				left: 0;
				z-index: -1;
				padding: 10px 20px;
				width: 100%;
				height: 100%;
				background: #fffff;
				color: gold;
				content: attr(data-hover);
				-webkit-transition: -webkit-transform 0.3s;
				-moz-transition: -moz-transform 0.3s;
				transition: transform 0.3s;
				-webkit-transform: translateX(-75%);
			}
			.cl a:hover span,
			.cl a:focus span {
				-webkit-transform: translateX(100%);
				-moz-transform: translateX(100%);
				transform: translateX(100%);
			}
			.cl a:hover::before,
			.cl a:focus::before {
				-webkit-transform: translateX(0%);
				-moz-transform: translateX(0%);
				transform: translateX(0%);
			}
			
			*{margin: 0px;padding: 0px;}
			
			.con{width: 1900px;height: 2300px; position: relative; }
			.box{width: 1900px;height: 2300px; background-image: url(img/fb2.jpg); position: absolute; filter: opacity(0.1); z-index:-1;}
			#top{width: 1900px;height: 200px;margin: auto;position: relative; background: white;  }
			#top1{width: 1320px;height: 80px;margin: auto;position: relative;}
			#top2{width: 1320px;height: 50px;margin: auto;background: #FF6B37; text-align: center;line-height: 30px; font-size:18px}
			#top3{width: 1900px;margin: auto;border-bottom: solid 3px #ff6b37; }
			#logo{margin-top: 30px;width: 160px;height: 60px;}
			
			.log_title{width: 120px;height: 40px;position: absolute; left:520px ;top:20px; font-size: 18px;color: white;text-align: center;line-height: 40px;}
			
			.log_ser{width: 390px;height: 66px; position: absolute; right:10px;bottom:10px; }
			
			 #wrap{width:360px; height:40px; background:rgb(255,102,51); float:  rihgt;  }
	        #i-t1{ width:290px; height:36px; border:2px solid rgb(255,102,51); float: left;  }
	        
	        #i-t1:hover{ border:2px solid rgb(255,102,51); }
	        #i-t2{  width:56px;  height:40px;  border: none; background:rgb(255,102,51); float: left; color: white; text-align: center;  line-height: 40px; }
	        #i-t2:hover{ background:rgb(255,133,91); }       
			
			.main{width: 1320px;height: 640px;margin: auto;position: relative; background: white;  }	
			
			.main_left{ border: solid 1px #ccc ; border-radius:20px  ; width: 920px;height: 750px;}
			.main_rin{width: 950px;height:587px;position:relative ;top: 120px; font-size: 20px; top: 70px; left:30px;  }	
			
			.main_rin tr{height:65px;}
			
			.main_text{width: 600px;height: 50px; border-radius:10px  ; position : relative ;top: -30px; left:80px; text-align: center;line-height: 50px;font-size: 20px;color: white;background: rgba(243, 96, 42,0.8);}
			
			.main_right{width: 300px;height: 500px;position: absolute;top: 20px;right:10px}
			.main_right h2{border-bottom: dashed 1px #ccc;line-height: 60px;letter-spacing: 3px;}
			.main_right p{line-height: 30px;font-size: 18px;letter-spacing: 2px;cursor: pointer; }
			.main_right p:hover{color:rgb(226, 55, 24);}
					
			.center{width: 1320px;height: 140px;background-repeat: no-repeat;background-size: 100%;margin: auto ; background: white; }
	
			.main_right_img{width: 300px;height:225px;background-size: 100% 100%; margin: 20px auto;}
			
			.down{width: 1320px;height: 850px; margin: auto;padding: 1px;position: relative; background: white; }
			.down_text{width: 1110px;height: 210px; margin-top: 10px; margin-left: 10px; border-bottom: dashed 1px #ccc;}
			.down_text h3{line-height: 50px;}
			.down_text p{line-height: 40px;font-size: 20px;}
			.down_text a{line-height: 50px;font-size: 18px;color: #ccc;}
			
			.down_left_img{width: 249px;height: 180px;position: relative;float: left;background-size: 100% 100%;}
			.down_left_text{width: 800px;height: 200px;float: left;position: relative;top: 15px;left: 10px;}
			.down_left_title{width: 1109px;height: 60px; border-bottom: dashed 1px #ccc; margin-left:10px;}
			
			.click_{cursor: pointer;}
			
			.down_text h3:hover{color:rgb(226, 55, 24);}
			
			#bottom{
				  width: 1320px;
				  height: 100px;
				  margin: auto;
				  font-family:"宋体";
				  color: #8c8c8c;
				  text-align: center;
				  line-height: 50px;
				  border-top: solid 2px darkgray;
			}
			
		
		</style>
		
		<link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.4.5/themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.4.5/themes/icon.css">
		<script type="text/javascript" src="js/jquery-easyui-1.4.5/jquery.min.js"></script>
		<script type="text/javascript" src="js/jquery-easyui-1.4.5/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="js/jquery-easyui-1.4.5/locale/easyui-lang-zh_CN.js"></script>
		
		<script type="text/javascript">
		
			//判断店铺电话格式的标志变量
			var tel_flag=true;
		
			// 美食收录信息上传提交
			function submitForm(){	

				if($("#rname").val()!=null&&$("#rname").val().trim().length!=0&&$("#rloc").val()!=null&&$("#rloc").val().trim().length!=0
						&&$("#rtel").val()!=null&&$("#rtel").val().trim().length!=0 && $("input[name='rkey']:checked")!=null &&$("input[name='rkey']:checked").length!=0 && $("#reason").val()!=null&&$("#reason").val().trim().length!=0
						&&$("#rbh").val()!=null&&$("#rbh").val().trim().length!=0){
					
					if(tel_flag){
						$.messager.show({
							title:'温馨提示',
							msg:'店铺电话格式不正确',
							timeout:3000,
							showType:'slide'
							
						});		
					}else if($("#reason").val().trim().length<15){
						$.messager.show({
							title:'温馨提示',
							msg:'收录理由不能少于15字',
							timeout:3000,
							showType:'slide'
							
						});	
					} else{
						$('#rin').form({
						    url:'addRAction',
						    onSubmit: function(){
						    	true
						    },
						    success:function(d){
						    	$.messager.show({
									title:'温馨提示',
									msg:d,
									timeout:3000,
									showType:'slide'
									
								});	
						    	if(d.indexOf("成功")!=-1){
						    		$('#rin').form('clear');
						    	}
						    }  
						});
						// submit the form
						$('#rin').submit();
					}
					
				}else{
					$.messager.show({
						title:'温馨提示',
						msg:'请填写必要信息',
						timeout:3000,
						showType:'slide'
					});
				}	
			}
			
			function clearForm(){
				$('#rin').form('clear');
	
			}
			// 加载餐厅种类		
			function queryRtype() {
				
				$.ajax({
					type:"post",
					url:"Res?method=queryRtype",
					dataType:"json",
					success: function (d) {	
						for(var i=0;i<d.length;i++){
							$("#rkey_td").append("&nbsp;<input type='checkbox' name='rkey' value="+d[i].rtype+"/>&nbsp;"+d[i].rtype+'&nbsp;&nbsp;');
						}		
					}
				});
			
			}
			
			//查询评价最高的餐厅
			function queryRtops() {
				
				$.ajax({
					type:"post",
					url:"Res?method=queryRtops",
					dataType:"json",
					success: function (d) {					
						$("#tops_img").css("background-image", "url(img\/" + d.rimg + ")");					
						$("#tops_text").append("<p id="+d.rid+">"+d.rname+"</p>");
						queryRnew();
					}
				});
				
			}
		//查询最新收录的餐厅
			function queryRnew() {
				
				$.ajax({
					type:"post",
					url:"Res?method=queryRnew",
					dataType:"json",
					success: function (d) {
						for(var i=0;i<d.length;i++){								
							$("#down_left_img"+i).css("background-image", "url(img\/" + d[i].rimg + ")");
							$("#down_left_text"+i).append($("<h3>"+d[i].rname+"</h3>"));
							$("#down_left_text"+i).append($("<p id="+d[i].rid+">"+d[i].rloc+"</p>"));
							$("#down_left_text"+i).append($("<a>"+d[i].reason+"</a>"));

						}
						queryRtype();
					}
				});
				
			}
			
			// 网页初始化加载
			$(function () {
				$("#rname").textbox('textbox').css("font-size", "18px");
				$("#rloc").textbox('textbox').css("font-size", "18px");
				$("#rtel").textbox('textbox').css("font-size", "18px");	
				$("#reason").textbox('textbox').css("font-size", "20px");
				$("#rbh").textbox('textbox').css("font-size", "18px");
				$("#file").textbox('textbox').css("font-size", "18px");
				
			//查询人气最高的餐厅	
				$.ajax({
					type:"post",
					url:"Res?method=queryRtopp",
					dataType:"json",
					success: function (d) {					
						$("#topp_img").css("background-image", "url(img\/" + d.rimg + ")");					
						$("#topp_text").append("<p id="+d.rid+">"+d.rname+"</p>");
						queryRtops();
					}
				});
			

				// 电话号码正则验证
				
				$("#rtel").textbox('textbox').blur(function() {
		            var phone = $(this).val();
		            var regM = /^0?1[3|4|5|7|8|9][0-9]\d{8}$/;
		            var regT = /^((0\d{2,3})-?)(\d{7,8})(-(\d{3,}))?$/;
		            var regTe = /^[1-9]\d{6,7}$/;
		            if (!(regM.test(phone) || regT.test(phone) || regTe.test(phone))) {
		            	
		                $("#rtel_msg").html("电话号码格式不正确，请重新输入！");		                
		                tel_flag=true;
		            }else{
		            	
		            	tel_flag=false;
		            }
		        });
			
				$("#rtel").textbox('textbox').focus(function() {
						
		            if ($("#rtel_msg").text()!="") {
		                $("#rtel_msg").text("");
		            }
		        });
		

				// 餐厅的单击事件
				$(".click_").click(function () {
					
					var rid=$(this).find("p").attr("id");
					 //使用encodeURI编码
					var searchUrl = encodeURI("ShowRestaurant.html?rid="+rid);
				//	location.href = searchUrl;				
					window.open(searchUrl, '_blank');
					
				});
				
				// 搜索单击事件
				
			$("#i-t1").focus(function(){
				$("#i-t1").css("outline","none");	
			});
				
		  	var va="";
		   	$("#i-t2").click(function(){
			   	$("#i-t2").css("background","rgba()");
			  	va=$("#i-t1").val().trim();
			  	
			  	if(va!=null&&va.length!=0){
			  		var searchUrl = encodeURI("main.html?va="+va);
				//	location.href = searchUrl;
			  		window.open(searchUrl, '_blank');
			  	}else{
			  		$.messager.show({
						title:'温馨提示',
						msg:'请输入要搜索的内容',
						timeout:3000,
						showType:'slide'
					});
			  	}
 
		   	});
				
		});
		
		</script>
							
	</head>
	<body>
		<div class="con">
			<div class="box"></div>
			<div id="top" class="top">
			 	<div class="log_title">
						
				</div>
				
			    <div id="top1">
			    	<div class="log_ser">
						
						<div id="wrap">
						    <input id="i-t1" placeholder="搜索" size="25"  value=""  style="padding-left:10px;font-size:16px;" >
						    <div id="i-t2"><h3>搜索 </h3>	
						    </div>
						</div>

					</div>
			    
			    	<div id="logo"><a href="login.html"  target="_self"><img src="img/logoword.jpg"/></div>
		  	
			    </div>
			    
			   
			    <div id="top2"  class="container">
		            <section class="c1">
			            <nav class="cl">
					        <a href="main.html"  target="_self" data-hover="主页"><span>主页</span></a> &nbsp;&nbsp;&nbsp; 
					        <a href="addR.html"  target="_self" data-hover="美食收录"><span>美食收录</span></a> &nbsp;&nbsp;&nbsp; 
					        <a href="block.html"  target="_self" data-hover="交流圈子"><span>交流圈子</span></a> &nbsp;&nbsp;&nbsp; 
					        <a href="usermain.html"  target="_self" data-hover="个人主页"><span>个人主页</span></a>
			            </nav>
		            </section>	
	            </div>
	            
		     	<div id="top3"></div>
			</div>
			
			
			
			

			
			<div class="main">
				<div class="main_right">
					<div class="click_">
						
						<h2>高分精选</h2>
						<div class="main_right_img" id="tops_img">
					
						</div>
						<div class="main_right_text" id="tops_text">
							
						</div>
					</div>
					<div class="click_">
					
						<h2>人气精选</h2>
						<div class="main_right_img" id="topp_img">
					
						</div>
						<div class="main_right_text" id="topp_text">
							
						</div>
					</div>
					
				</div>
				
				<div class="main_left">
					<div class="main_rin">
						<div class="main_text">
							
							美食收录信息填写
						</div>
					
						<form id="rin" method="post" enctype="multipart/form-data">
					    	<table cellpadding="5">
					    		<tr>
					    			<td>店铺名称:</td>
					    			<td><input class="easyui-textbox" type="text" id="rname" name="rname" data-options="required:true" style="width:500px;height:36px;"></input></td>
					    		</tr>
					    		<tr>
					    			<td>店铺地址:</td>
					    			<td><input class="easyui-textbox" type="text" id="rloc" name="rloc" data-options="required:true" style="width:500px;height:36px;"></input></td>
					    		</tr>
					    		<tr>
					    			<td>店铺电话:</td>
					    			<td><input class="easyui-textbox" type="text" id="rtel" name="rtel" data-options="required:true" style="width:300px;height:36px;" ></input><label id="rtel_msg" style="font-size:18px"></label></td>
					    		</tr>
					    		<tr>
					    			
						    		<td>美食类别:</td>
						    		<td id="rkey_td"> </td>
						    		
					    		</tr>
					    		<tr style="height:100px">
					    			<td valign="top">收录理由:</td>
					    			<td><input class="easyui-textbox" type="text" id="reason" name="reason" data-options="required:true,multiline:true,prompt:'请填写收录理由...（不少于15字）'" style="width:650px;height:90px;"></input></td>
					    		</tr>
					    		<tr>
					    			<td>营业时间:</td>
					    			<td><input class="easyui-textbox" type="text" id="rbh" name="rbh" data-options="required:true" style="width:300px;height:36px;"></input></td>
					    		</tr>
					    		<tr>
					    			<td>图片上传:</td>
					    			<td> <input class="easyui-filebox"  id="file" name ="file"  data-options="buttonIcon:'icon-search', buttonText: '浏览'  ,prompt:'请选择文件...( jpg / jpeg / png )'" style="width:320px;height:36px;"></input></td>
					    		</tr>
					    		
					    	</table>
					    </form>
					    <br />
					    <div style="text-align:center;padding:5px;font-size:30px">
					    	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()" style="width:100px"><p class="btn_su">提交</p></a>&nbsp;&nbsp;&nbsp;
					    	<a href="javascript:void(0)" class="easyui-linkbutton" id="rcancel" onclick="clearForm()" style="width:100px"><p class="btn_su">清空</p></a>
					    </div>				
				
					</div>
				</div>

			</div>
			<div class="center">
				
			</div>
			
			
			<div class="down">
				<div class="down_left_title">
					<p><h2>最新推荐</h2></p>
					
				</div>
				<div class="down_text click_" >
					
					<div class="down_left_img" id="down_left_img0">
						
					</div>
					
					<div class="down_left_text" id="down_left_text0">
						
						
					</div>
					
				</div>
				<div class="down_text click_">
					<div class="down_left_img" id="down_left_img1">
						
					</div>

					<div class="down_left_text" id="down_left_text1">
						
						
					</div>
				</div>
				
				<div class="down_text click_">
					<div class="down_left_img" id="down_left_img2">
						
					</div>

					<div class="down_left_text" id="down_left_text2">
						
						
					</div>
				</div>
				
				
			</div>
			

			<div id="bottom" >
		      	2022 chihuo.com,All Rights Reserved. 本站发布的所有内容，未经许可，不得转载，详见《知识产权声明》
		    </div>
		</div>
	</body>
</html>

